const state = {
  activePath: localStorage.getItem('activePath') || '',
}

const mutations = {
  updateActivePath: (state, payload) => {
    state.activePath = payload
    localStorage.setItem('activePath',payload)
  },
  deleteActivePath: (state, payload) => {
    state.activePath = ''
    localStorage.removeItem('activePath')
  },
}

const actions = {}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
}
